@extends('layout.admin.master')
@section('content')
    <div class="card">
        <div class="card-body">
            <ul class="nav nav-tabs nav-tabs-sm">
                <li class="nav-item">
                    <a href="{{route('permission.role.index')}}" class="nav-link ">
                        用户分类列表
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{route('permission.user.create')}}" class="nav-link  ">
                        添加用户分类
                    </a>
                </li>
                <li class="nav-item">
                    <a href="{{route('permission.user.edit',$user)}}" class="nav-link  active">
                        编辑用户分类
                    </a>
                </li>
            </ul>
<div class="card-body">
    <div class="row">
        <div class="col-9">
            <form action="{{route('permission.user.update',$user)}}" method="post">
                @csrf @method('PUT')
                {{--昵称--}}
                <div class="form-group">
                    <label>昵称</label>
                    <input type="text" name="name" class="form-control" placeholder="请输入昵称" value="{{$user->name}}">
                </div>
                <!-- Email address -->
                <div class="form-group">
                    <label>账号</label>
                    <!-- Input -->
                    <input type="text" name="account" class="form-control" placeholder="请输入正确的邮箱或手机号" value="{{$user->email? $user->email:$user->phone}}">
                </div>
                <!-- Password -->
                <div class="form-group">
                    <div class="row">
                        <div class="col">
                            <label>密码</label>
                        </div>
                    </div>
                    <!-- Input group -->
                    <div class="input-group input-group-merge">
                        <!-- Input -->
                        <input type="password" name="password" class="form-control form-control-appended" placeholder="请输入密码">
                        <div class="input-group-append">
                  <span class="input-group-text">
                    <i class="fe fe-eye"></i>
                  </span>
                        </div>
                    </div>
                </div>
                {{--确认密码--}}
                <div class="form-group">
                    <div class="row">
                        <div class="col">
                            <label>确认密码</label>
                        </div>
                    </div> <!-- / .row -->
                    <!-- Input group -->
                    <div class="input-group input-group-merge">
                        <!-- Input -->
                        <input type="password" name="password_confirmation" class="form-control form-control-appended" placeholder="请重新输入密码">
                        <!-- Icon -->
                        <div class="input-group-append">
                  <span class="input-group-text">
                    <i class="fe fe-eye"></i>
                  </span>
                        </div>
                    </div>
                </div>
                <div class="form-check">
                    <input class="form-check-input" type="checkbox" id="gridCheck1" name="is_admin" @if($user->is_admin==1) checked @endif>
                    <label class="form-check-label" for="gridCheck1">
                        设为管理员
                    </label>
                </div>
                <!-- Submit -->
                <button class="btn btn-lg btn-block btn-primary mb-3 mt-4">
                    保存数据
                </button>
            </form>
        </div>
    </div>
</div>
        </div>
        <div class="card-footer text-muted">
            底部
        </div>
    </div>

@endsection
